﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MS.Common.Infr.In
{
    public interface IBaseRepository<T> where T : class
    {
        /// <summary>
        /// 获取所有数据
        /// </summary>
        /// <returns> 所有数据</returns>
        IQueryable<T> GetAll();
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="entity"> 要添加的数据</param>
        /// <returns> 返回受影响行数</returns>
        int Add(T entity);
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="entity"> 要更新的数据</param>
        /// <returns> 返回受影响行数</returns>
        int Update(T entity);
    }
}
